import Watcher from './watchAndDep/Watcher.js'
import { isStr} from "./utils.js";
import { renderRealDomByVnode, createEmptyVnode }  from './vnode/main.js'
import { compileToFunction } from './Compiler.js'

function initMounted(vm){
    //callHooks(beforeMoounted) render => template => outerHTML => ASt => Vnode => diff => patchs => new Watcher => callHooks (mounted)

    let updateComponent = ()=>{

        vm._update(vm._render(), false)
    }

    vm._watcher = new Watcher(vm, updateComponent)
}

export default initMounted
